/*
 *                  BioJava development code
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  If you do not have a copy,
 * see:
 *
 *      http://www.gnu.org/copyleft/lesser.html
 *
 * Copyright for this code is held jointly by the individual
 * authors.  These should be listed in @author doc comments.
 *
 * For more information on the BioJava project and its aims,
 * or to join the biojava-l mailing list, visit the home page
 * at:
 *
 *      http://www.biojava.org/
 * 
 * Created on Nov 1, 2007
 * 
 */

package dasregistry;

import java.lang.reflect.Method;

public class CourseRegistrationBean {

	String name;
	String openid;
	String email;
	String day1;
	String day2;
	String day3;
	String suggestedTopic;
	String accomodation1;
	String accomodation2;
	String accomodation3;
	String accomodation4;
	String specialRequirement;
	String comment;
	String flightArrival;
	String flightDeparture;
	String flightArrivalNr;
	String flightDepartureNr;
	String recordSaved;
	String funding;
	String dinner;
	String language;
	
	public CourseRegistrationBean(){
		name="";
		day1="yes";
		day2="yes";
		day3="yes";
		suggestedTopic="";
		accomodation1="no";
		accomodation2="no";
		accomodation3="no";
		accomodation4="no";
		specialRequirement = "";
		comment="";
		flightArrival="";
		flightDeparture="";
		flightArrivalNr="";
		flightDepartureNr="";
		recordSaved="false";
		funding = "other";
		dinner   = "please specify";
		language = "please specify";
	}
	
	 public String toString(){
	    	StringBuffer buf = new StringBuffer();
	    	
	    
	        try {
	            Class c = Class.forName("dasregistry.CourseRegistrationBean");
	            Method[] methods  = c.getMethods();
	            
	            for (int i = 0; i < methods.length; i++) {
	                Method m = methods[i];     
	                
	                String name = m.getName();
	                
	                if (name.equals("getRecordSaved"))
	                       continue;
	                
	                if ( name.substring(0,3).equals("get")) {
	                   
	                   
	                    Object o  = m.invoke(this, new Object[]{});
	                    if ( o instanceof String){
	                        if ( o != null)
	                            buf.append(name.substring(3, name.length())+": "+ o + "\n");
	                    }	                    
	                }
	                
	            }
	            
	        } catch (Exception e){
	            e.printStackTrace();
	        }
	        
	        
	    	//if ( organismScientific != null)
	    	//	buf.append(" organism scientific: " + organismScientific);

	    	
	    	return buf.toString();
	    }
	

	 
	 
	 public String getSuggestedTopic() {
			return suggestedTopic;
		}

		public void setSuggestedTopic(String suggestedTopic) {
			this.suggestedTopic = suggestedTopic;
		}

		public String getDay3() {
			return day3;
		}

		public void setDay3(String day3) {
			this.day3 = day3;
		}
	 
	 
	 
	public String getDinner() {
		return dinner;
	}

	public void setDinner(String dinner) {
		this.dinner = dinner;
	}

	public String getLanguage() {
		return language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	public String getRecordSaved() {
		return recordSaved;
	}

	public void setRecordSaved(String recordSaved) {
		this.recordSaved = recordSaved;
	}

	public String getAccomodation1() {
		return accomodation1;
	}

	public void setAccomodation1(String accomodation1) {
		this.accomodation1 = accomodation1;
	}

	public String getAccomodation2() {
		return accomodation2;
	}

	public void setAccomodation2(String accomodation2) {
		this.accomodation2 = accomodation2;
	}

	public String getAccomodation3() {
		return accomodation3;
	}

	public void setAccomodation3(String accomodation3) {
		this.accomodation3 = accomodation3;
	}

	public String getAccomodation4() {
		return accomodation4;
	}

	public void setAccomodation4(String accomodation4) {
		this.accomodation4 = accomodation4;
	}
	
	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getDay1() {
		return day1;
	}

	public void setDay1(String day1) {
		this.day1 = day1;
	}

	public String getDay2() {
		return day2;
	}

	public void setDay2(String day2) {
		this.day2 = day2;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getFlightArrival() {
		return flightArrival;
	}

	public void setFlightArrival(String flightArrival) {
		this.flightArrival = flightArrival;
	}

	public String getFlightArrivalNr() {
		return flightArrivalNr;
	}

	public void setFlightArrivalNr(String flightArrivalNr) {
		this.flightArrivalNr = flightArrivalNr;
	}

	public String getFlightDeparture() {
		return flightDeparture;
	}

	public void setFlightDeparture(String flightDeparture) {
		this.flightDeparture = flightDeparture;
	}

	public String getFlightDepartureNr() {
		return flightDepartureNr;
	}

	public void setFlightDepartureNr(String flightDepartureNr) {
		this.flightDepartureNr = flightDepartureNr;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public String getSpecialRequirement() {
		return specialRequirement;
	}

	public void setSpecialRequirement(String specialRequirement) {
		this.specialRequirement = specialRequirement;
	}

	public String getFunding() {
		return funding;
	}

	public void setFunding(String funding) {
		this.funding = funding;
	}
	
	
}
